// preparing language file
var aLangKeys=new Array();
aLangKeys['en']=new Array();
          
aLangKeys['en']['username']='Username';
aLangKeys['en']['password'] = 'Password';
aLangKeys['en']['newusername']='Enter a new username';
aLangKeys['en']['newpassword'] = 'Enter a new password';
aLangKeys['en']['forgotten_password'] = 'Forgot your password?';
aLangKeys['en']['login'] = 'Login';
        

aLangKeys['en']['NewUser'] = 'New user';
aLangKeys['en']['NewCompany'] = 'Add a company';
        

aLangKeys['en']['Name'] = 'Name';
aLangKeys['en']['Company'] = 'Company';
aLangKeys['en']['Email'] = 'E-mail';
aLangKeys['en']['Show'] = 'Show';
aLangKeys['en']['Edit'] = 'Edit';
aLangKeys['en']['Activate'] = 'Activate';
aLangKeys['en']['Remove'] = 'Remove';
aLangKeys['en']['Exit'] = 'Exit';
aLangKeys['en']['Add'] = 'Add';
aLangKeys['en']['Save'] = 'Save';
aLangKeys['en']['Back'] = 'Back';
aLangKeys['en']['Send'] = 'Send';
aLangKeys['en']['Error'] = ' kunde inte skapas';

aLangKeys['en']['header_List'] = 'List Users';
aLangKeys['en']['header_Innovations'] = 'Innovations';
aLangKeys['en']['header_LogOut'] = 'Log Out';
aLangKeys['en']['header_ListCompany'] = 'List business';

aLangKeys['en']['ButtonYellow'] = 'Not activated account. Click to send a new activation email.';
aLangKeys['en']['ButtonGreen'] = 'Active account, click to disable.';
aLangKeys['en']['ButtonRed'] = 'Inactive Account. Click to activate.';
aLangKeys['en']['ButtonHidden'] = 'have been hidden. To make account visible, click the icon again.';




aLangKeys['en']['Add_Label'] = 'Add new Company';
aLangKeys['en']['Add_CompanyName'] = 'Company Name';
aLangKeys['en']['Add_CompanyEmail'] = 'Company E-mail';
aLangKeys['en']['Add_Manager'] = 'Manager';
aLangKeys['en']['Add_ManagerEmail'] = 'Manager E-mail';
          
aLangKeys['en']['edit_Label'] = 'Contact details';
aLangKeys['en']['edit_CompanyName'] = 'Company Name';
aLangKeys['en']['edit_CompanyEmail'] = 'Company E-mail';
aLangKeys['en']['edit_Manager'] = 'Managers';
aLangKeys['en']['edit_AddManager'] = 'Add manager';
         
aLangKeys['en']['show_User'] = 'Show Users';
           
aLangKeys['en']['editEmp_label'] = 'Editing contact information';
           
aLangKeys['en']['editManager_Name'] = 'Managers Name';
aLangKeys['en']['editManager_Email'] = 'Managers E-mail';

aLangKeys['en']['addEmployee_new'] = 'New user';
aLangKeys['en']['addEmployee_manager'] = 'Users manager';

aLangKeys['en']['activated'] = ' has been activated. To disable the user, just click the icon again.';
aLangKeys['en']['deactivated'] = ' have become disabled. To activate your account, just click the icon again.';
aLangKeys['en']['saved'] = ' has now been saved.';
aLangKeys['en']['skapad'] = ' is created. An activation email has been sent to the specified address.';
aLangKeys['en']['NewMail'] = 'A new activation email has been sent to the User ';
aLangKeys['en']['RemoveRow'] = 'Are you sure you want to delete ';
aLangKeys['en']['ChangesDone'] = 'There are changes that have not been saved';
aLangKeys['en']['HaveRemoved'] = ' has been removed';
aLangKeys['en']['ReShowRow'] = 'Do you want to show ';

aLangKeys['en']['Company_Name_Taken'] = 'Company name is taken. Please enter another name.';
aLangKeys['en']['Company_Email_Taken'] = 'Company mail is taken. Please enter another email.';
aLangKeys['en']['Manager_Mail_Taken'] = 'Manager mail is taken. Please enter another email.';
aLangKeys['en']['Employee_Email_Taken'] = 'Employee email is taken. Please enter another email.';
aLangKeys['en']['Company_Name_Not_Empty'] = 'Company name can not be empty. Please enter a name.';
aLangKeys['en']['Company_Email_Not_Empty'] = 'Company email can not be empty. Please enter an email.';
aLangKeys['en']['Manager_Name_Not_Empty'] = 'Manager name can not be empty. Please enter a name.';
aLangKeys['en']['Manager_Email_Not_Empty'] = 'Manager email can not be empty. Please enter an email.';
aLangKeys['en']['Employee_Name_Not_Empty'] = 'Employee name can not be empty. Please enter a name.';
aLangKeys['en']['Employee_Email_Not_Empty'] = 'Employee email can not be empty. Please enter an email.';
aLangKeys['en']['Employee_Supervisor_Not_Empty'] = 'Employee supervisor can not be empty. Please choose a supervisor.';

aLangKeys['en']['show_Innovations'] = 'Innovations';

aLangKeys['en']['forgottenText'] = 'To reset your password, please fill in your email address. You will shortly receive an email containing a password reset.';
aLangKeys['en']['See_Hidden'] = 'Show hidden';
aLangKeys['en']['list_NeedSelect'] = 'Must select at least one for exporting.';




function getText(key) {
	if(aLangKeys['en'][key] != null)
		return aLangKeys['en'][key];
	else
		return key;
}


$(document).ready(function() {

        // translate all translatable elements
        $('.tr').each(function(i){
		if($(this).is("input"))
		{
			$(this).val(aLangKeys['en'][ $(this).attr('key') ]);
		}
		else
		{
		    $(this).text(aLangKeys['en'][$(this).attr('key')]);
		}
        });
        $('.tr_add').each(function(i){
		    if($(this).is("input"))
		    {
		        $(this).val(aLangKeys['en'][$(this).attr('key')]);
		    }
		    else
		    {
		        $(this).prepend(aLangKeys['en'][$(this).attr('key')]);
		    }
        });
        $('.tr_back').each(function (i) {
            if ($(this).is("input")) {
                $(this).val(aLangKeys['en'][$(this).attr('key')]);
            }
            else {
                $(this).append(aLangKeys['en'][$(this).attr('key')]);
            }
        });

});
